<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>
    // 练习:有一个黄色的小狗,叫大黄,今年已经三岁了,250斤的重量每次走路都很慢,喜欢吃大骨头
    let dog = {
        color: 'yellow',
        name: '大黄',
        age: 3,
        weight: 250,
        eat: function () {
            console.log('喜欢吃大骨头');
        }
    }
    console.log(dog.color, dog.age, dog.name, dog.weight);
    dog.eat();
    // 练习:创建一个手机对象,手机有型号,有颜色,可以打电话和发短信
    let phone = {
        type: 'realme',
        color: 'purple',
        feature: function () {
            console.log('可以打电话和发短信');
        }
    }
    console.log(phone.type, phone.color);
    phone.feature();
</script>

</html>